let str = "   123    ";
console.log(str.trimEnd());
//     123
